package com.kk.bussiness.login.ui;

import org.zkoss.zk.au.AuRequest;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.South;

@SuppressWarnings("serial")
public class EnterSystemComponent extends South 
{
	public EnterSystemComponent()
	{
		this.setId("COMP_ENTER_SYS");
		
		Clients.clearBusy();
	}
	
	@Override
	public void service(AuRequest request, boolean everError)
	{
		if (request.getCommand().equals("onEnterSystem"))
		{
			String isSkip = request.getData().get("isSkip").toString();
			//掉过播放
			if (isSkip.equals("1"))
			{
				com.kk.framework.session.CookieManager.setCookie(Executions.getCurrent(), "SkipWelcomePagePlay", "1");
			}
			
			Clients.showBusy("正在进入系统，请稍后……");
			Executions.sendRedirect("./index.zul");
			return;
		}
	}
}
